3.1.95 \(\int \frac {A+B x+C x^2+D x^3}{x (a+b x^2)^2} \, dx\)

Optimal. Leaf size=95 \[ \frac {(a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}-\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {x (b B-a D)-a C+A b}{2 a b \left (a+b x^2\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {1805, 801, 635, 205, 260} \begin {gather*} -\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {(a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {x (b B-a D)-a C+A b}{2 a b \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^2),x]

[Out]

(A*b - a*C + (b*B - a*D)*x)/(2*a*b*(a + b*x^2)) + ((b*B + a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(3/2)
) + (A*Log[x])/a^2 - (A*Log[a + b*x^2])/(2*a^2)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 1805

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[(c*x)^m*Pq,
 a + b*x^2, x], f = Coeff[PolynomialRemainder[(c*x)^m*Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[
(c*x)^m*Pq, a + b*x^2, x], x, 1]}, Simp[((a*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*
(p + 1)), Int[(c*x)^m*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*(p + 1)*Q)/(c*x)^m + (f*(2*p + 3))/(c*x)^m, x], x],
 x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && ILtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^2} \, dx &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}-\frac {\int \frac {-2 A-\frac {(b B+a D) x}{b}}{x \left (a+b x^2\right )} \, dx}{2 a}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 A}{a x}+\frac {-a b B-a^2 D+2 A b^2 x}{a b \left (a+b x^2\right )}\right ) \, dx}{2 a}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {A \log (x)}{a^2}-\frac {\int \frac {-a b B-a^2 D+2 A b^2 x}{a+b x^2} \, dx}{2 a^2 b}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {A \log (x)}{a^2}-\frac {(A b) \int \frac {x}{a+b x^2} \, dx}{a^2}+\frac {(b B+a D) \int \frac {1}{a+b x^2} \, dx}{2 a b}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {(b B+a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {A \log (x)}{a^2}-\frac {A \log \left (a+b x^2\right )}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 85, normalized size = 0.89 \begin {gather*} \frac {\frac {a (-a (C+D x)+A b+b B x)}{b \left (a+b x^2\right )}-A \log \left (a+b x^2\right )+\frac {\sqrt {a} (a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{3/2}}+2 A \log (x)}{2 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^2),x]

[Out]

((a*(A*b + b*B*x - a*(C + D*x)))/(b*(a + b*x^2)) + (Sqrt[a]*(b*B + a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(3/2) +
 2*A*Log[x] - A*Log[a + b*x^2])/(2*a^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^2),x]

[Out]

IntegrateAlgebraic[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 296, normalized size = 3.12 \begin {gather*} \left [-\frac {2 \, C a^{2} b - 2 \, A a b^{2} + {\left (D a^{2} + B a b + {\left (D a b + B b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, {\left (D a^{2} b - B a b^{2}\right )} x + 2 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \left (b x^{2} + a\right ) - 4 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \relax (x)}{4 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}, -\frac {C a^{2} b - A a b^{2} - {\left (D a^{2} + B a b + {\left (D a b + B b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + {\left (D a^{2} b - B a b^{2}\right )} x + {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \left (b x^{2} + a\right ) - 2 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \relax (x)}{2 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*C*a^2*b - 2*A*a*b^2 + (D*a^2 + B*a*b + (D*a*b + B*b^2)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x -
a)/(b*x^2 + a)) + 2*(D*a^2*b - B*a*b^2)*x + 2*(A*b^3*x^2 + A*a*b^2)*log(b*x^2 + a) - 4*(A*b^3*x^2 + A*a*b^2)*l
og(x))/(a^2*b^3*x^2 + a^3*b^2), -1/2*(C*a^2*b - A*a*b^2 - (D*a^2 + B*a*b + (D*a*b + B*b^2)*x^2)*sqrt(a*b)*arct
an(sqrt(a*b)*x/a) + (D*a^2*b - B*a*b^2)*x + (A*b^3*x^2 + A*a*b^2)*log(b*x^2 + a) - 2*(A*b^3*x^2 + A*a*b^2)*log
(x))/(a^2*b^3*x^2 + a^3*b^2)]

________________________________________________________________________________________

giac [A]  time = 0.35, size = 93, normalized size = 0.98 \begin {gather*} -\frac {A \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {A \log \left ({\left | x \right |}\right )}{a^{2}} + \frac {{\left (D a + B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} - \frac {C a^{2} - A a b + {\left (D a^{2} - B a b\right )} x}{2 \, {\left (b x^{2} + a\right )} a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^2,x, algorithm="giac")

[Out]

-1/2*A*log(b*x^2 + a)/a^2 + A*log(abs(x))/a^2 + 1/2*(D*a + B*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b) - 1/2*(C
*a^2 - A*a*b + (D*a^2 - B*a*b)*x)/((b*x^2 + a)*a^2*b)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 125, normalized size = 1.32 \begin {gather*} \frac {B x}{2 \left (b \,x^{2}+a \right ) a}+\frac {B \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a}-\frac {D x}{2 \left (b \,x^{2}+a \right ) b}+\frac {D \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {A}{2 \left (b \,x^{2}+a \right ) a}+\frac {A \ln \relax (x )}{a^{2}}-\frac {A \ln \left (b \,x^{2}+a \right )}{2 a^{2}}-\frac {C}{2 \left (b \,x^{2}+a \right ) b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^2,x)

[Out]

1/2/a/(b*x^2+a)*B*x-1/2/(b*x^2+a)/b*x*D+1/2/a/(b*x^2+a)*A-1/2/(b*x^2+a)/b*C-1/2*A*ln(b*x^2+a)/a^2+1/2/a/(a*b)^
(1/2)*arctan(1/(a*b)^(1/2)*b*x)*B+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*D+A*ln(x)/a^2

________________________________________________________________________________________

maxima [A]  time = 2.91, size = 87, normalized size = 0.92 \begin {gather*} -\frac {C a - A b + {\left (D a - B b\right )} x}{2 \, {\left (a b^{2} x^{2} + a^{2} b\right )}} - \frac {A \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {A \log \relax (x)}{a^{2}} + \frac {{\left (D a + B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(C*a - A*b + (D*a - B*b)*x)/(a*b^2*x^2 + a^2*b) - 1/2*A*log(b*x^2 + a)/a^2 + A*log(x)/a^2 + 1/2*(D*a + B*
b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x+C\,x^2+x^3\,D}{x\,{\left (b\,x^2+a\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x + C*x^2 + x^3*D)/(x*(a + b*x^2)^2),x)

[Out]

int((A + B*x + C*x^2 + x^3*D)/(x*(a + b*x^2)^2), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x**3+C*x**2+B*x+A)/x/(b*x**2+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________